package problem.nc103;

public class Solution {
    /**
     * 反转字符串
     * @param str string字符串
     * @return string字符串
     */
    public String solve (String str) {
        // write code here
        char[] arr = str.toCharArray();

        StringBuilder sb = new StringBuilder();

        for(int i = arr.length-1 ; i >= 0; i--){
            sb.append(arr[i]);
        }
        return sb.toString();
    }
}
